﻿using System.Collections;
using System.Collections.Generic;

namespace Kotonoha.Server.Dictionaries {
    public class Meaning : IEnumerable<string> {
        private IList<string> meanings = new List<string>();

        public virtual long Id { get; set; }

        public virtual void Add(string content) {
            meanings.Add(content);
        }

        public virtual string this[int idx] {
            get {
                return meanings[idx];
            }
        }

        public virtual IEnumerator<string> GetEnumerator() {
            return meanings.GetEnumerator();
        }

        public override string ToString() {
            return string.Format("Meanings: {0}", meanings.Count);
        }

        IEnumerator IEnumerable.GetEnumerator() {
            return GetEnumerator();
        }

        protected virtual IList<string> Meanings {
            get { return meanings; }
            set { meanings = value; }
        }
    }
}
